<include file="../Public/header" />
<link href="{:APPS_URL}/w3g/_static/style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
  body{background-color: #f8f8f8;}
</style>
<div id="content">
        <div id="weiba" data-title="{$weiba_name|getShort=6,'...'}" class="panel" data-selected="true"  data-menu="msgmenu" style="padding:0;">
        <header>
            <div id="header-buttons">
                <a href="javascript:history.go(-1);">
                    <div id="back" class="header-menu-link" data-back="false">
                    </div>
                </a>

                <div id="messageLink" class="header-menu-link"><a href="{:U('w3g/Index/msgbox')}"><i class="num"></i></a></div>
        <div id="menuLink" class="header-menu-link"></div>
            </div>
            <h1 class="hasback">
                {$weiba_name}
            </h1>
        </header>
        <div class="mainWeiba">
            <div class="weiba_info">
                <dl>
                    <dt>
                        <h1><img width="90" height="90" src="{$weiba_detail['logo']}"></h1>
                        <h2>{$weiba_name}{:W('FollowWeiba',array('weiba_id'=>$weiba_detail['weiba_id'],'follow_state'=>array('following'=>$follow_state[$weiba_detail['weiba_id']]['following']),'isrefresh'=>1))}</h2>
                        <h3>粉丝&nbsp;{$weiba_detail['follower_count']}　帖子&nbsp;{$weiba_detail['thread_count']}<br/>吧主<volist name="weiba_master" id="vo">&nbsp;<a href="{:U('w3g/Index/profile', array('uid'=>$weiba_detail['uid']))}">{:getUserName($vo['follower_uid'])}</a></volist></h3>
                    </dt>
                    <php>if($weiba_detail['intro']){</php>
                    <dd><span>简介</span>{$weiba_detail.intro}</dd>
                    <php>}</php>
                    <php>if($weiba_detail['notify']){</php>
                    <dd><span>公告</span>{:var_dump($weiba_detail['notify'])}</dd>
                    <php>}</php>
                </dl>
            </div>

            <div class="weiba_tab">
                <a class="ico_post" href="{:U('w3g/Weiba/post',array('weiba_id'=>$weiba_detail['weiba_id']))}"><img height="23" class="icons" src="{:APPS_URL}/w3g/_static/images/ico_post.png" alt="发帖"></a>
                <div class="sort_select" for="listData">
                    <a href="javascript:;"><img height="9" class="mr5" src="{:APPS_URL}/w3g/_static/images/ico_shaix.png">{$type=='digest'?'精华':'全部'}</a>
                    <div class="sort_layer" style="display:none;">
                        <span class="arrow_st"><img height="6" src="{:APPS_URL}/w3g/_static/images/arrow_st.png"></span>
                        <ul>
                            <li data-type="all"{$type=='digest'?'':' class="current"'} data-url="{:U('w3g/Weiba/detail', array('weiba_id'=>$weiba_detail['weiba_id'],'type'=>'all'))}"><a href="javascript:;">全部</a></li>
                            <li data-type="digest"{$type=='digest'?' class="current"':''} data-url="{:U('w3g/Weiba/detail', array('weiba_id'=>$weiba_detail['weiba_id'],'type'=>'digest'))}"><a href="javascript:;">精华</a></li>
                        </ul>
                    </div>
                </div>
                <input type="hidden" id="listType" value="all"/>
            </div>
            <div class="weiba_postlist">
              <ul id="listData">
                <volist name="list.data" id="vo">
                <li onclick="javascript:window.open('{:U('w3g/Weiba/postDetail',array('post_id'=>$vo['post_id']))}','_self')">
                    <div class="name">
                        <php>if($vo['top']==2||$vo['top']==1){</php><i class="ico-bar-top">顶</i><php>}</php><php>if($vo['recommend']){</php><i class="ico-bar-recd">荐</i><php>}</php><php>if($vo['digest']==1){</php><i class="ico-bar-fine">精</i><php>}</php>
                        <a href="{:U('w3g/Weiba/postDetail',array('post_id'=>$vo['post_id']))}"><span>{$vo.title}</span><!--<php>if(preg_match('/<img/i',$vo['content'])){</php><i class="ico-img"><img class="icons" width="16" src="{:APPS_URL}/w3g/_static/images/ico-img.png"></i><php>}</php></a>-->
                    </div>
                    <div class="info clearfix">
                    	<div class="left">
                        	<a href="{:U('w3g/Index/profile','uid='.$vo['post_uid'])}">{$user_info[$vo['post_uid']]['uname']}</a>&nbsp;-&nbsp;<span>{$vo.post_time|friendlyDate}</span>
                        </div>
                        <div class="right">
                        <php>if($vo['reply_count']>0){</php><span class="plnum">{$vo.reply_count}</span><php>if($vo['read_count']>0){echo '　/　';}}if($vo['read_count']>0){</php><span class="llnum">{$vo.read_count}</span><php>}</php>
                        </div>
                    </div>
                </li>
                </volist>
              </ul>
              <php>if($list['totalPages']>1):</php>
              <div id="pager_box">
              	<php>if($list['nowPage']>1):</php>
                <a href="{:U('w3g/Weiba/detail',array('weiba_id'=>$weiba_detail['weiba_id'],'type'=>$type,'page'=>$list['nowPage']-1))}" id="prev" class="pure-button pager_child pager_p_n pure-button-primary">上一页</a>
                <php>endif;</php>
                <php>if($list['nowPage']<$list['totalPages']):</php>
                <a href="{:U('w3g/Weiba/detail',array('weiba_id'=>$weiba_detail['weiba_id'],'type'=>$type,'page'=>$list['nowPage']+1))}" id="next" class="pure-button pager_child pager_p_n pure-button-primary">下一页</a>
                <php>endif;</php>
              </div>
              <php>endif;</php>
            </div>

        </div>
    </div>
<include file="../Public/footer" />